package com.atguigu.common.exception;

import lombok.Getter;

/**
 * @version 1.0
 * @Author yanjr
 * @Date 2021/4/16
 * @Description com.atguigu.common.exception
 */
@Getter
public enum BizCodeEnum {
    UNKONW_EXCEPTION(10000, "系统未知异常"),
    VALID_EXCEPTION(100001, "参数格式校验失败"),
    PRODUCT_UP_EXCEPTION(100002, "商品上架错误"),
    SMS_CODE_EXCEPTION(100003, "60s内不能再发验证码"),
    USER_EXIST_EXCEPTION(150001, "用户名已经存在"),
    PHONE_EXIST_EXCEPTION(150002, "手机号已经存在"),
    NO_STOCK_EXCEPTION(210001, "商品库存不足"),
    LOGINACCT_PASSWORD_INVALID(150003, "账号或密码错误")
    ;

    private Integer code;
    private String msg;

    BizCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
